<template>
	<view>
		<view class="facility-container">
			<view class="title">
				<view class="left">楼层信息</view>
				<view class="right">
					<text class="add" @click="onShow">
						+
					</text>
					<text @click="showAdd" style="color: #5094FF;">新增楼层</text>
					<text class="more" @click="goMore">查看更多</text>
				</view>
			</view>
			<view class="info">
				<view v-if="floorList">
					<view class="info-item" v-for="(item,index) in floorList" :key="index">
						<view>
							<view class="info-wrap">楼层名称：{{item['楼层名称']}}</view>
							<!-- <view class="info-wrap">楼层编号：{{item['分区编号']}}</view> -->
						</view>
						<!-- <view class="arrow"></view> -->
						<view class="edit" @click.stop="onEdit(item)">编辑</view>
						<view class="delete" @click.stop="onDelete(item.楼层id)">删除</view>
					</view>
				</view>
				<view v-else class="empty">暂无楼层</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: ['floorList'],
		data() {
			return {

			};
		},
		methods: {
			showAdd() {
				this.$emit('add')
			},
			onDelete(id) {
				this.$emit('delete', id)
			},
			onEdit(item) {
				this.$emit('edit', item)
			},
			goMore() {
				this.$emit('more')
			}
		}
	}
</script>

<style lang="scss">

</style>
